﻿<Window x:Class="MiniMusicPlayer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MiniMusicPlayer.Controls"
        xmlns:designInControl="clr-namespace:DesignInControl"
        Title="MainWindow" Height="200" Width="600"
        AllowsTransparency="True"
        WindowStyle="None"
        Background="Transparent"
        Topmost="True"
        Deactivated="WindowDeactivated"
        Name="MusicPlayerWindow"
        Loaded="WindowLoaded"
        ShowInTaskbar="False"
        ResizeMode="NoResize"
        Icon="Images/Window/Music.png"
        Closing="WindowClosing"
        >
    <Window.Resources>
        <ContextMenu x:Key="ContextMenuNotifyIcon" x:Name="ContextMenuNotifyIcon">
            <MenuItem Header="Playlist" Click="PlaylistClicked"/>
            <MenuItem Header="About" Click="AboutClicked"/>
            <MenuItem Header="Settings" Click="SettingsClicked"></MenuItem>
            <MenuItem Header="Exit" Click="CloseWindow" />
        </ContextMenu>

        <Style x:Key="ButtonStyleSquare" x:Name="ButtonStyleSquare" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <!--<Border BorderThickness="2" BorderBrush="Gray" CornerRadius="2">-->
                            <ContentPresenter />

                            <!--</Border>-->
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ButtonStyle" x:Name="ButtonStyle" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Ellipse Name="EllipsePl1" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Stroke="Gray" StrokeThickness="2" Fill="{TemplateBinding Background}" />
                            <ContentPresenter />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ButtonPlayStyle" x:Name="ButtonPlayStyle" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Normal/Play.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPauseStyle" x:Name="ButtonPauseStyle" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Normal/Pause.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PauseDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPlayModeLoop" x:Name="ButtonPlayModeLoop" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Other/PlayModeLoopBlue.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayModeLoopDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPlayModeSingle" x:Name="ButtonPlayModeSingle" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Other/PlayModeSingleBlue.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayModeSingleDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPlayModeRandom" x:Name="ButtonPlayModeRandom" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Other/PlayModeRandomBlue.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayModeRandomDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonMute" x:Name="ButtonMute" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Normal/Mute.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/MuteDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonUnMute" x:Name="ButtonUnMute" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Other/MuteBlue.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/MuteDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPlaylistActive" x:Name="ButtonPlaylistActive" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Other/PlayListBlue.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayListDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="ButtonPlaylistActivate" x:Name="ButtonPlaylistActivate" TargetType="{x:Type Image}">
            <Setter Property="Source" Value="Images/Button/Normal/PlayList.png" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="Images/Button/MouseOver/PlayListDarkGray.png"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Grid>

        <StackPanel x:Name="StackPanelOptions" Orientation="Horizontal" Margin="330,0,-243,0" Visibility="Hidden">

        </StackPanel>

        <controls:CirclePanel x:Name="CirclePanel" OuterRadius="100" Visibility="Visible">
            <Button x:Name="ButtonPlayPause" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="PlayPause" Background="White">
                <Image x:Name="ImagePlayPause" Style="{StaticResource ButtonPlayStyle}"/>
            </Button>
            <Button x:Name="ButtonNext" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="Next" Background="White">
                <Image>
                    <Image.Resources>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Images/Button/Normal/Next.png" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="Images/Button/MouseOver/NextDarkGray.png"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Resources>
                </Image>
            </Button>
            <Button x:Name="Playlist"   Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="PlaylistClicked" Background="White">
                <Image x:Name="ImagePlaylist" Style="{StaticResource ButtonPlaylistActivate}"/>
            </Button>
            <Button x:Name="Playmode"   Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="PlayModeClicked" Background="White">
                <Image x:Name="ImagePlayMode" Style="{StaticResource ButtonPlayModeLoop}" />
            </Button>

            <Button x:Name="ButtonInfo" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="AboutClicked" Background="White" >
                <Image>
                    <Image.Resources>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Images/Button/Normal/Info.png" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="Images/Button/MouseOver/InfoDarkGray.png"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Resources>
                </Image>
            </Button>


            <Button x:Name="Mute"   Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="MuteClicked" Background="White">
                <Image x:Name="ImageMute" Style="{StaticResource ButtonMute}" />
            </Button>

            <Button x:Name="ButtonQuieter" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="VolumeDown" Background="White">
                <Image>
                    <Image.Resources>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Images/Button/Normal/QuieterGray.png" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="Images/Button/MouseOver/QuieterDarkGray.png"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Resources>
                </Image>
            </Button>

            <Button x:Name="ButtonLouder" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="VolumeUp" Background="White">
                <Image>
                    <Image.Resources>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Images/Button/Normal/LouderGray.png" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="Images/Button/MouseOver/LouderDarkGray.png"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Resources>
                </Image>
            </Button>

            <Button x:Name="ButtonBack" Style="{StaticResource ButtonStyle}" Width="30" Height="30" Click="PreviousSongClicked" Background="White">
                <Image>
                    <Image.Resources>
                        <Style TargetType="{x:Type Image}">
                            <Setter Property="Source" Value="Images/Button/Normal/Back.png" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="Images/Button/MouseOver/BackDarkGray.png"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Resources>
                </Image>
            </Button>
        </controls:CirclePanel>


        <designInControl:CircularProgressBar HorizontalAlignment="Center" VerticalAlignment="Center" Percentage="{Binding ElementName=MusicPlayerWindow, Path=MusicPlayer.Progress }" SegmentColor="White" StrokeThickness="2" Radius="25" />
        <Button x:Name="ButtonSettings" Style="{StaticResource ButtonStyleSquare}" Width="35" Height="35" Click="MenuClicked" Background="White" AllowDrop="True" Drop="ItemsDropped">
            <Image Source="Images/Window/Music_64.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </Button>
        <Ellipse x:Name="EllipseDragMove" Width="20" Height="20" Margin="55,54,25,26" MouseLeftButtonDown="Move" Fill="White" Stroke="Gray" StrokeThickness="2"/>

    </Grid>
</Window>
